home *** CD-ROM | disk | FTP | other *** search
/ Especial Multimedia / Especial Multimedia.iso / Multimed / Prg / THRMDEMO.ZIP / THRMDEMO.FRM < prev    next >
Text File  |  1997-09-14  |  3KB  |  78 lines

  1. VERSION 2.00
  2. Begin MDIForm ThermDemo 
  3.    Caption         =   "Thermometer Demo"
  4.    ClientHeight    =   5760
  5.    ClientLeft      =   2010
  6.    ClientTop       =   2730
  7.    ClientWidth     =   8985
  8.    Height          =   6450
  9.    Left            =   1950
  10.    LinkTopic       =   "MDIForm1"
  11.    Top             =   2100
  12.    Width           =   9105
  13.    Begin Menu mFile 
  14.       Caption         =   "&File"
  15.       Begin Menu mThermDemo 
  16.          Caption         =   "Demo Thermometer"
  17.       End
  18.       Begin Menu mExit 
  19.          Caption         =   "E&xit"
  20.          Shortcut        =   ^X
  21.       End
  22.    End
  23. End
  24. Option Explicit
  25. '*******************************************************
  26. '* Integrated Data Systems, Inc.                       *
  27. '* 23875 Ventura Blvd. #102                            *
  28. '* Calabasas, Ca  91302                                *
  29. '* Voice: (818)223-3344                                *
  30. '* BBS:   (818)223-3341                                *
  31. '* CIS:   73700,1622                                   *
  32. '*******************************************************
  33. '*                                                     *
  34. '*      File Name: ThrmDemo.BAS                        *
  35. '*                                                     *
  36. '*        Created: 12/23/94     By: Robert Vandehey    *
  37. '*                                                     *
  38. '*******************************************************
  39.  
  40. 'This program demonstrates a wait box which displays a
  41. 'thermometer. One of the main features of this wait box
  42. 'is that it acts modal without actually declaring it as
  43. 'modal.
  44.  
  45. 'In Visual Basic, once a modal form is called, all execution
  46. 'in the calling program is stopped until the form is unloaded.
  47. 'This doesn't work for wait screens since you usually want to
  48. 'display a wait screen and continue on processing.
  49.  
  50. 'Visual Basic allows you to display a modeless window and continue
  51. 'processing but if the user selects another window with the
  52. 'mouse, it will change the focus of the window. Many times hiding
  53. 'the wait window.
  54.  
  55. 'I looked at many other programs that tried to solve this problem
  56. 'but none of them did it effectively. This program does - at least
  57. 'in my humble opinion.
  58.  
  59. 'It solves this problem by looping through all the Visual Basic
  60. 'forms in the Forms Control array and calling the Windows API
  61. 'SetWindowLong function to set the DISABLE style for each window.
  62.  
  63. 'Once the wait window is no longer needed, the DISABLE style is
  64. 'removed.
  65.  
  66. 'Currently this program only supports one instance of the wait form.
  67. 'It could easily support more, but I can't think of a reason why anyone
  68. 'would need more than one wait form at a time.
  69.  
  70. Sub mExit_Click ()
  71.     Unload ThermDemo
  72. End Sub
  73.  
  74. Sub mThermDemo_Click ()
  75.     Load form1
  76. End Sub
  77.  
  78.